home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Environments / Small Eiffel 0.4.8 / lib_rand / demo2.e < prev    next >
Text File  |  1997-04-13  |  582b  |  32 lines

  1. -- Part of SmallEiffel -- Read DISCLAIMER file -- Copyright (C) 
  2. -- Dominique COLNET and Suzanne COLLIN -- colnet@loria.fr
  3. --
  4. class DEMO2
  5.  
  6. creation make 
  7.  
  8. feature
  9.  
  10.    make is
  11.       local
  12.      std_rand: MIN_STAND;
  13.      count: INTEGER;
  14.       do
  15.      io.put_string("Using the MIN_STAND random number generator.%N%
  16.                %How many numbers ? ");
  17.      io.read_integer;
  18.      count := io.last_integer;
  19.      from
  20.         !!std_rand.make;
  21.      until
  22.         count = 0
  23.      loop
  24.         std_rand.next;
  25.         io.put_real(std_rand.last_real);
  26.         count := count - 1;
  27.         io.put_string("%N");
  28.      end;
  29.       end;
  30.  
  31. end -- DEMO2
  32.